package com.gsm.phimhanhdong;

import android.app.Activity;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

import com.google.analytics.tracking.android.EasyTracker;

public class AboutActivity extends Activity implements android.view.View.OnClickListener{
	
	private Button btnOkay;
	private TextView version;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_about);
		EasyTracker.getInstance().setContext(this);
		btnOkay = (Button) findViewById(R.id.btn_okay);
		version = (TextView) findViewById(R.id.about_version);
		btnOkay.setOnClickListener(this);
		try {
			PackageInfo ai = getPackageManager().getPackageInfo("com.appota.videoyoutubeappota", 0);
			version.setText(getResources().getString(R.string.version) + ": " + ai.versionName);
		} catch (NameNotFoundException e) {
			e.printStackTrace();
		}
	}
	
	
	

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		finish();
	}
	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
	}
	@Override
	protected void onStop() {
		// TODO Auto-generated method stub
		super.onStop();
		EasyTracker.getInstance().activityStop(this);
	}

	@Override
	protected void onStart() {
		// TODO Auto-generated method stub
		super.onStart();
		EasyTracker.getTracker().sendView("AboutActivity");
	}
}
